package cn.edu.sjtu.se.dslab.rhapsody.parse;

import java.util.ArrayList;
import java.util.List;

public class UmlModel {
	
	private String id;
	private String name;
	
	private List<XmiType> children;
	
	public UmlModel(){
		children = new ArrayList<XmiType>();
	}

	public List<XmiType> getChildren() {
		return children;
	}

	public void setChildren(List<XmiType> children) {
		this.children = children;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public XmiComposite getUmlPackage(String name){
		for (XmiType xt :children){
			if(xt.getName().equals(name))
				return (XmiComposite)xt;
		}
		return null;
	}
	
}
